package cn.comtom.ewbs.signature.entity;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Blob;
import java.time.LocalDateTime;

import org.apache.ibatis.type.BlobTypeHandler;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
 
/**
 * <p>
 * 
 * </p>
 *
 * @author liuhy
 * @since 2022-11-08 18:12:05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "sign_apply",autoResultMap = true)
@ApiModel(value = "SignApply对象", description = "")
public class SignApply extends Model<SignApply> {
 
    private static final long serialVersionUID = 1L;
 
    @ApiModelProperty("主键")
    @TableId("id")
    private String id;
 
    @ApiModelProperty("申请文件")
    @TableField(value = "apply_file",typeHandler = BlobTypeHandler.class)
    private byte[] applyFile;
 
    @ApiModelProperty("申请文件名称")
    @TableField("apply_file_name")
    private String applyFileName;
 
    @ApiModelProperty("申请设备数量")
    @TableField("apply_dev_num")
    private Integer applyDevNum;
 
    @ApiModelProperty("申请状态：0-未申请，1-成功，2-失败")
    @TableField("apply_status")
    private Integer applyStatus;
 
    @ApiModelProperty("结果文件")
    @TableField(value = "result_file",typeHandler = BlobTypeHandler.class)
    private byte[] resultFile;
 
    @ApiModelProperty("结果文件名")
    @TableField("result_file_name")
    private String resultFileName;
 
    @ApiModelProperty("申请结果")
    @TableField("apply_result")
    private String applyResult;
 
    @ApiModelProperty("创建人")
    @TableField("creator")
    private String creator;
 
    @ApiModelProperty("创建日期")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
 
    @ApiModelProperty("申请人")
    @TableField("applytor")
    private String applytor;
 
    @ApiModelProperty("申请日期")
    @TableField("apply_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applyTime;
 
 
    @Override
    public Serializable pkVal() {
        return this.id;
    }
 
}